// 封装所有商品的api请求
import app from '@/util/request.js'

//获取分类列表
export function getCategoryList(params){
	return app({
		url:"/productCategory/list/0",
		method:"get",
		params:params
	})
}
//获取商品分类以及对应的子分类信息
export function getCategoryWithChildren(params){
	return app({
		url:"/productCategory/list/withChildren",
		method:"get",
		params:params
	})
}

//查看下级
export function getChildrenList(id,params){
	return app({
		url:"/productCategory/list/"+id,
		method:"get",
		params:params
	})
}

//删除分类
export function productCatDelete(id){
	return app({
		url:"/productCategory/delete/"+id,
		method:"post"
	})
}